The simplest way to run a simulation is to use:
simpleSimu=slsirSimu(pop=100,tstep=150)
This use defautl value whcih are detailed in the doc: ?slsirSimu
The output of the simulation can be visualised by adding:
simpleSimu=slsirSimu(pop=100,tstep=150,visu=T)
In this visualisation, light blue squares represent agents conforming to social distancing, blue circle represent agents not conforming to social distancingcircle agents
A more conveniant way to run simulations, used in the paper, is to use generatePopulation to pre-generate population:
pop=generatePopulation(N=100,xsize=100,ysize=100,speed=1,recovery=1)
This will create a table with all information about the population:
Then the properties of the population can be adjusted
pop[c(10:20),"speed"]=5 #agents 10 to 20 will go five time more quiclkly than all other agents
simpleSimu=slsirSimu(pop=pop,tstep=150,visu=T)